﻿#region Copyright and License
/*==============================================================================
 *  Copyright (c) www.51mvc.com Corporation.  All rights reserved.
 * ===============================================================================
 * This code and information is provided "as is" without warranty of any kind,
 * either expressed or implied, including but not limited to the implied warranties
 * of merchantability and fitness for a particular purpose.
 * ===============================================================================
 * Licensed under the GNU General Public License (GPL) v2
 * http://www.51mvc.com/
 * Create By 小鱼(Leven)  - http://leven.com.cn
 * ==============================================================================*/
#endregion
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Infancy.Core.Container {
    public interface IContainer : IDisposable {
        string Name { get; }

        void Initialize();

        T Resolve<T>();

        void TearDown();

        #region Events

        event EventHandler<ContainerEventsArgs> Initializing;

        event EventHandler<ContainerEventsArgs> Initialized;

        event EventHandler<ContainerEventsArgs> TearDowning;

        event EventHandler<ContainerEventsArgs> TearDowned;

        event EventHandler<ContainerFailedEventsArgs> ResolveFailed;

        #endregion
    }
}
